import 'package:basic_common/common_exports.dart';


class FeedBackController extends GetxController {
  TextEditingController feedbackControntroller = TextEditingController();

  /// 提交反馈意见
 void postFeedback() async {
    String info = feedbackControntroller.text;
    if (info.isEmpty) {
      ToastUtils.toast("意见内容不能为空");
      return ;
    }
    HttpData res = await ApiService().postFeedBack(
        data: {"feedbackType": "7", "feedbackInfo": info});
    if (res.code == 1) {
      ToastUtils.toast("提交成功");
      Get.back();
    } else {
      ToastUtils.toast("提交失败");
    }
  }

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
  }
}
